package com.example.demo.mapper;

import com.example.demo.model.Role;
import org.apache.ibatis.annotations.*;
import java.util.List;

@Mapper
public interface RoleMapper {
    
    @Select("SELECT * FROM roles WHERE role_id = #{roleId}")
    Role findById(Integer roleId);
    
    @Select("SELECT * FROM roles WHERE role_name = #{roleName}")
    Role findByName(String roleName);
    
    @Select("SELECT * FROM roles")
    List<Role> findAll();
} 